package com.xhh.fs.dao;

import com.xhh.fs.pojo.Book;
import com.xhh.fs.pojo.Category;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface BookDAO extends JpaRepository<Book,Integer> {
    //通过分类查询
    List<Book> findAllByCategory(Category category);
    //通过标题或者作者查询
    List<Book> findAllByTitleLikeOrAuthorLike(String keyword1, String keyword2);
}
